package com.loop.tryCatchDemo;

public class TryCatchFinallyDemo {
    public static void main(String[] args) {
        test();
    }
    public static int test(){
        int i = 0;
        try {
            i = 10/0;
            return i;
        } catch (Exception exception) {
            System.out.println("捕捉异常");;
            exception.getMessage();
            exception.toString();
            exception.printStackTrace();
            return i;
        } finally {
            System.out.println("一定运行");
        }
    }


}
